<!DOCTYPE html>
<html lang="en">
<head>
    <#include "/common/header.ftl">
</head>
<body>
<div id="wrapper" class="toggled">
    <#include "/common/nav.ftl">
    <div class="page-content-wrapper">
        <div class="container-fluid">
            <#include "/common/search.ftl">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <table class="table table table-hover table-bordered table-condensed">
                        <thead>
                        <tr>

                            <th>
                                订单id
                            </th>

                            <th>
                                姓名
                            </th>

                            <th>
                                地址
                            </th>

                            <th>
                                手机号
                            </th>

                            <th>
                                金额
                            </th>

                            <th>
                                商品状态
                            </th>

                            <th>
                                支付状态
                            </th>

                            <th>
                                创建时间
                            </th>

                            <th>
                                修改时间
                            </th>

                            <th>
                                详情
                            </th>

                            <th>
                                修改
                            </th>

                        </tr>
                        </thead>
                        <tbody>
                        <#list orderDTOList as orderDTO>

                            <tr class="info">

                                <td>
                                    ${orderDTO.orderId}
                                </td>

                                <td>
                                    ${orderDTO.buyerName}
                                </td>

                                <td>
                                    ${orderDTO.buyerPhone}
                                </td>

                                <td>
                                    ${orderDTO.buyerAddress}
                                </td>

                                <td>
                                    ${orderDTO.orderAmount}
                                </td>

                                <td>
                                    ${orderDTO.getOrderStatusEnum().message}
                                </td>

                                <td>
                                    ${orderDTO.getPayStatusEnum().message}
                                </td>

                                <td>
                                    ${(orderDTO.createTime)?string('yyyy-MM-dd HH:mm:ss')}
                                </td>

                                <td>
                                    ${(orderDTO.updateTime)?string('yyyy-MM-dd HH:mm:ss')}
                                </td>


                                <td>
                                    <a href="/orderMaster/detail?orderId=${orderDTO.orderId}&page=${page}&size="${size}">详情</a>
                                </td>

                                <td>
                                    <#if orderDTO.getOrderStatusEnum().message == "新订单">
                                        <a href="/orderMaster/cancel?orderId=${orderDTO.orderId}&page=${page}&size="${size}">取消</a>
                                    </#if>
                                </td>
                            </tr>

                        </#list>
                        </tbody>
                    </table>

                    <div class="container">
                        <div class="row clearfix">
                            <div class="col-md-12 column">
                                <ul class="pagination pill-right">

                                    <#if  page lte 1 >
                                        <li class="disabled">
                                            <a href="#">
                                            上一页
                                            </a>
                                        </li>
                                    <#else>
                                        <li>
                                            <#--todo:  下一页-->
                                            <a href="/orderMaster/list?page=${page-1}&size="${size}">
                                            上一页
                                            </a>
                                        </li>
                                    </#if>


                                    <#-- 中间页-->
                                    <#list 1..total as index>
                                        <#if page == index>
                                            <li class="disabled">
                                                <a href="#">
                                                ${index}
                                                </a>
                                            </li>
                                        <#else>
                                            <li>
                                                <a href="/orderMaster/list?page=#{index}&size="${size}">
                                                ${index}
                                                </a>
                                            </li>
                                        </#if>
                                    </#list>


                                    <#if page gte total>
                                        <li class="disabled">
                                            <a href="#">
                                            下一页
                                            </a>
                                        </li>
                                    <#else >
                                        <li>
                                            <a href="/orderMaster/list?page=${page+1}&size="${size}">
                                            下一页
                                            </a>
                                        </li>
                                    </#if>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<script>
</script>

</html>